#ifndef CMDLINEOPTIONINSTANCE_H_JM_20130102
#define CMDLINEOPTIONINSTANCE_H_JM_20130102

#include <string>
#include <vector>

#include "../cast.h"

namespace jmlib {

	class CmdLineOptionInstance {
	public:
		typedef std::vector<std::string> Values;
		CmdLineOptionInstance() { }
		bool isUsed() const { return !optName_.empty(); }
		std::string getUsedOptionName() const { return optName_; }
		void setUsed(const std::string& optName) { optName_ = optName; }
		Values* getValues() { return &values_;}

		template<typename T>
		T getValue(const size_t i = 0) {
			return convert<T>(values_.at(i));
		}

	private:
		std::string optName_;
		Values values_;
	};	
} // namespace jmlib

#endif
